<div class="layui-form-item">
        <label class="layui-form-label">导航字体颜色</label>
        <div class="layui-input-block">
            <input type="color" name="tabBar_color" value="#999999">
        </div>
    </div>
<div class="clear"></div>

<div class="layui-form-item">
    <label class="layui-form-label">导航1</label>
    <div class="layui-input-block">
        <input type="file" data="0" class="tabBar_iconPath" name="tabBar_iconPath1">
        <input type="text"  data="0" name="tabBar_text1" lay-verify="required" placeholder="" autocomplete="off" class="layui-input tabBar_text" style="width: 80%;">
    </div>
</div>
<div class="clear"></div>

<div class="layui-form-item">
    <label class="layui-form-label">导航2</label>
    <div class="layui-input-block">
        <input type="file" data="1" class="tabBar_iconPath" name="tabBar_iconPath2">
        <input type="text" data="1" name="tabBar_text2" lay-verify="required" placeholder="" autocomplete="off" class="layui-input tabBar_text" style="width: 80%;">
    </div>
</div>
<div class="clear"></div>

<div class="layui-form-item">
    <label class="layui-form-label">导航3</label>
    <div class="layui-input-block">
        <input type="file" data="2" class="tabBar_iconPath" name="tabBar_iconPath3">
        <input type="text" data="2" name="tabBar_text3" lay-verify="required" placeholder="" autocomplete="off" class="layui-input tabBar_text" style="width: 80%;">
    </div>
</div>
<div class="clear"></div>

<script type="text/javascript">

	$('input[name=tabBar_color]').on('change',function(){
		$('.wx_bottom .bottom_01').css('color',$(this).val());
	});

	$('.tabBar_iconPath').on('change',function(){
		if(this.files && this.files[0]){
			var reader = new FileReader();
			var a = $(this).attr('data');
			reader.onload = function(evt){
                console.log(evt.target.result);
				$('.bottom_01').eq(a).children('img').attr('src',evt.target.result);
            }
            reader.readAsDataURL(this.files[0]);
		}
	});

    $('.tabBar_text').on('input',function(){
        var b = $(this).attr('data');
        $('.bottom_01').eq(b).find('span').html($(this).val());
    });

</script>